package com.allinpay.merchantweb.service;

import java.util.List;

import com.allinpay.merchantweb.model.CommRoleInfo;
import com.allinpay.merchantweb.model.CommRolePrivilege;
import com.allinpay.merchantweb.model.CommUserRole;
import com.allinpay.merchantweb.request.AddRoleInfoRequest;
import com.allinpay.merchantweb.response.ResponseData;


/**
 * 权限服务接口
 * @author dell
 *
 */
public interface ICommPrivilegeService {

	/**
	 * 根据userAccount查询用户的权限列表
	 * @param userAccount
	 * @return List<CommPrivilegeInfo>
	 */
	public Object getPrivilegesByAccount(String userAccount) throws Exception;
	
	/**
	 * 根据userAccount查询用户的首页树状菜单
	 * @param userAccount
	 * @return List<CommPrivilegeInfo>
	 */
	public Object getEntryMenuTreeByAccount(String userAccount) throws Exception;
	
  
    /**
	 * 查询所有企业类型权限信息
	 * @return
	 * @throws BusinessException
	 */
	public Object queryCompPrivilege()throws Exception;
	
	
	/**
	 * 查询通联类型权限信息
	 * @return
	 * @throws DaoException
	 */
	public Object queryAllinpayPrivilege()throws Exception;
	
	
	
	/**
	 * 检查角色名是否已存在
	 * @param roleName
	 * @return
	 * @throws Exception
	 */
	public boolean checkRoleNameExist(String roleName) throws Exception;
	
	/**
	 * 检查是否有企业管理员角色(通联管理员创建)
	 * @param instanceId
	 * @return
	 * @throws Exception
	 */
	public boolean checkHasSuperAdminRole( String instanceId) throws Exception;
	
	
	
	/**
	 * 添加角色信息
	 * @param roleInfo
	 * @param privilegeList
	 * @return
	 * @throws Exception
	 */
	public boolean addRoleInfo( CommRoleInfo roleInfo) throws Exception;
	
	
	/**
	 * 修改角色信息  
	 * @param roleInfo
	 * @param privilegeList
	 * @return
	 * @throws Exception
	 */
	public boolean updateRoleInfo( CommRoleInfo roleInfo) throws Exception;
	
	
	
	/**
	 * 批量删除角色信息
	 * @param roleInfo
	 * @param privilegeList
	 * @return
	 * @throws Exception
	 */
	public boolean batchDeleteRoleInfo( List<Integer> roleIdList) throws Exception;
	
	
	/**
	 * 更新角色信息
	 * @param roleInfo
	 * @param privilegeList
	 * @return
	 * @throws Exception
	 */
	public boolean updateRoleInfo( CommRoleInfo roleInfo, List<CommRolePrivilege> privilegeList) throws Exception;
	
	/**
	 * 删除角色信息
	 * @param roleInfo
	 * @return
	 * @throws Exception
	 */
	public boolean delteRoleInfo( CommRoleInfo roleInfo) throws Exception;
	
	
	public Object queryUserRoleList( CommUserRole commUesrRole ) throws Exception;


	/**
	 * 查询角色列表   
	 * @param commRoleInfo
	 * @return
	 * @throws Exception
	 */
	public ResponseData<CommRoleInfo> queryRoleInfoList(CommRoleInfo commRoleInfo) throws Exception;
	
	/**
	 * 查询角色权限列表 
	 * @param commRolePrivilege
	 * @return
	 * @throws Exception
	 */
	public Object queryRolePrivilegeList(CommRolePrivilege commRolePrivilege) throws Exception;
	
	
	
//	/**
//	 * 添加用户角色
//	 * @param commUserRole
//	 * @return
//	 * @throws Exception
//	 */
//	public boolean addUserRole( CommUserRole commUserRole ) throws Exception;
//	
//	/**
//	 * 更新用户角色
//	 * @param commUserRole
//	 * @return
//	 * @throws Exception
//	 */
//	public boolean updateUserRole( CommUserRole commUserRole ) throws Exception;
//	
//	/**
//	 * 删除用户角色
//	 * @param commUserRole
//	 * @return
//	 * @throws Exception
//	 */
//	public boolean deleteUserRole( CommUserRole commUserRole ) throws Exception;
	
	
	
	
}